\documentclass{article}
\usepackage{tikz,amsmath}
\usetikzlibrary{arrows.meta}
\usepackage[graphics,tightpage,active]{preview}
\PreviewEnvironment{tikzpicture}
\begin{document}
\begin{tikzpicture}[>=Stealth]
    \draw [->] (-3.5,0) -- (3.5,0) node[anchor=north] {$x$};
    \draw [->] (0,-1.0) -- (0,5) node[anchor=east] {$y$};
    \node at (-0.3,-0.3) {$O$};
    \node at (0.5,1.3) {$(0, 1)$};

    \draw[domain=2.3:-1.7,samples=50] plot (\x, {0.4^\x}) +(-0.7, -0.3) node {$y = a^x$} +(-0.8, -0.9) node{$(0 < a < 1)$};
    \draw[dash pattern=on 5mm off 2mm] (3, 1) -- (-3, 1) +(0.5, -0.4) node {$y = 1$};
\end{tikzpicture}
\end{document}